const path = require('path');
const resolve = (dir) => {
	return path.join(__dirname, dir);
};
module.exports = {
	publicPath: './',
	outputDir: 'big',
	chainWebpack: (config) => {
		config.resolve.alias
			.set('_c', resolve('src/components')) // key,value自行定义，比如.set('@@', resolve('src/components'))
			.set('@', resolve('src')); // key,value自行定义，比如.set('@@', resolve('src/components'))
	},
	devServer: {
		host: '0.0.0.0',
		port: '8080',
		hot: true,
		// https:false,
		open: true,
		//以上的ip和端口是我们本机的;下面为需要跨域的
		proxy: {
			//配置跨域
			'/jeecg-boot': {
				target: 'http://39.105.228.41:8085',
				ws: true,
				changeOrigin: true, //允许跨域
				pathRewrie: {
					'^/jeecg-boot': '', //请求的时候使用这个api就可以
				},
			},
		},
	},
};
